package com.ytjj.qmyx.admin.eunm;

/**
 *
 * 
 * @Version: 1.0
 */
public enum ProductActivityTypeEnums {

	CASH_SCORE("CASH_SCORE", "积分兑换"),
	GET_SCORE("GET_SCORE", "积分返现"),
	SECKILL("SECKILL", "限时秒杀"),
	OLD_FOR_NEW("OLD_FOR_NEW", "品牌补贴"),
	CASH_COUPON("CASH_COUPON", "红包"),
	RETURN_COUPON("RETURN_COUPON", "红包返现"),
	PAY_AFTER_USE("PAY_AFTER_USE", "先用后付"),
	WALLET_DEDUCTION("WALLET_DEDUCTION", "钱包抵扣"),
	EXCLUSIVE_TRIAL("EXCLUSIVE_TRIAL", "专属试用"),
	DISCOUNTS_TRIAL_ACTIVITY("DISCOUNTS_TRIAL_ACTIVITY","优惠试用活动");



	private String code;

	private String name;

	ProductActivityTypeEnums(String code, String name) {
		this.code = code;
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	/**
	 * 根据枚举code获取名称
	 * @param code
	 * @return
	 */
	public static String getName(String code){
		ProductActivityTypeEnums[] list = ProductActivityTypeEnums.values();
		for (ProductActivityTypeEnums item : list) {
			if (item.getCode().equals(code)) {
				return item.getName();
			}
		}
		return null;
	}
}
